﻿using Reece.Open.Objects;

namespace Reece.Open.Mvc.Common
{
    public class SubMenu : INestedMenu
    {
        private string _id;

        public SubMenu()
        {
            
        }

        public SubMenu(string id)
        {
            _id = id;
        }

        public string StartMenu()
        {
            string  output;
            if (!string.IsNullOrEmpty(_id))
            {
                output = string.Format("<ul id='{0}'>", _id);
            }
            else
            {
                output = "<ul>";
            }
            return output;
        }

        public string FinishMenu()
        {
            return "</ul>";
        }
    }
}